<template>
  <div>
    <span v-if="!show">
      <router-link to="/index/binglliindex/binglilist" class="styleaddBingli">电子病历</router-link>
      <router-link to="/index/binglliindex/bingliadd" class="styleaddBingli">添加病历</router-link>
    </span>
    <!-- <router-link v-if="show" to="/index/binglliindex/bingliseenedit"
      ></router-link
    > -->
     <span class="router-link-active styleaddBingli" v-if="show">
          病例查看
     </span>

       <router-view class="bigwhite"></router-view>
  </div>
</template>

<script>
import '../../assets/css/reset.scss'
export default {
  data() {
    return {
      show: false,
    };
  },
  watch:{
    $route(to,from){
        console.log(to.path,from)
        if(to.path=='/index/binglliindex/bingliseenedit'){
             this.show=true;
        }else{
          this.show=false;
        }
    }
  },
  mounted(){
       if(this.$route.path=='/index/binglliindex/bingliseenedit'){
console.log('asdasd')
             this.show=true;

        }else{
          this.show=false;
        }
  }
};
</script>

<style lang="scss" scoped>
.router-link-active {
 background-image: linear-gradient(to right, #2dc6e1, #14dfba) !important;
  padding: 14px 35px;
  border-top-left-radius: 30px;
  border-bottom-right-radius: 30px;
  color: white;
  display: inline-block;
}

</style>